package com.ruoyi.sports.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sports.mapper.AdviceMapper;
import com.ruoyi.sports.domain.Advice;
import com.ruoyi.sports.service.IAdviceService;

/**
 * 反馈建议Service业务层处理
 * 
 * @author ZJH
 * @date 2023-03-13
 */
@Service
public class AdviceServiceImpl implements IAdviceService 
{
    @Autowired
    private AdviceMapper adviceMapper;

    /**
     * 查询反馈建议
     * 
     * @param adviceId 反馈建议主键
     * @return 反馈建议
     */
    @Override
    public Advice selectAdviceByAdviceId(Long adviceId)
    {
        return adviceMapper.selectAdviceByAdviceId(adviceId);
    }

    /**
     * 查询反馈建议列表
     * 
     * @param advice 反馈建议
     * @return 反馈建议
     */
    @Override
    public List<Advice> selectAdviceList(Advice advice)
    {
        return adviceMapper.selectAdviceList(advice);
    }

    /**
     * 新增反馈建议
     * 
     * @param advice 反馈建议
     * @return 结果
     */
    @Override
    public int insertAdvice(Advice advice)
    {
        return adviceMapper.insertAdvice(advice);
    }

    /**
     * 修改反馈建议
     * 
     * @param advice 反馈建议
     * @return 结果
     */
    @Override
    public int updateAdvice(Advice advice)
    {
        return adviceMapper.updateAdvice(advice);
    }

    /**
     * 批量删除反馈建议
     * 
     * @param adviceIds 需要删除的反馈建议主键
     * @return 结果
     */
    @Override
    public int deleteAdviceByAdviceIds(Long[] adviceIds)
    {
        return adviceMapper.deleteAdviceByAdviceIds(adviceIds);
    }

    /**
     * 删除反馈建议信息
     * 
     * @param adviceId 反馈建议主键
     * @return 结果
     */
    @Override
    public int deleteAdviceByAdviceId(Long adviceId)
    {
        return adviceMapper.deleteAdviceByAdviceId(adviceId);
    }
}
